package com.server.pinggu.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.server.pinggu.mapper.SenCountOrderMapper;
import com.server.pinggu.domain.SenCountOrder;
import com.server.pinggu.service.ISenCountOrderService;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ltao
 * @date 2022-10-23
 */
@Service
public class SenCountOrderServiceImpl extends ServiceImpl<SenCountOrderMapper, SenCountOrder> implements ISenCountOrderService {

    @Override
    public List<SenCountOrder> queryList(SenCountOrder senCountOrder) {
        LambdaQueryWrapper<SenCountOrder> lqw = Wrappers.lambdaQuery();
        if (senCountOrder.getDate() != null){
            lqw.eq(SenCountOrder::getDate ,senCountOrder.getDate());
        }
        if (senCountOrder.getPay() != null){
            lqw.eq(SenCountOrder::getPay ,senCountOrder.getPay());
        }
        if (senCountOrder.getNum() != null){
            lqw.eq(SenCountOrder::getNum ,senCountOrder.getNum());
        }
        if (senCountOrder.getAllPay() != null){
            lqw.eq(SenCountOrder::getAllPay ,senCountOrder.getAllPay());
        }
        if (senCountOrder.getAllNum() != null){
            lqw.eq(SenCountOrder::getAllNum ,senCountOrder.getAllNum());
        }
        return this.list(lqw);
    }
}